package com.zzzyh.forumsystemclient.services.impl;

import com.zzzyh.forumsystemclient.dao.MessageMapper;
import com.zzzyh.forumsystemclient.model.Message;
import com.zzzyh.forumsystemclient.services.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServiceImpl implements IMessageService {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<Message> list() {
        return messageMapper.list();
    }

    @Override
    public void add(Message message) {
        messageMapper.insertSelective(message);
    }
}
